<?php
$this->pageTitle=Yii::app()->name . ' - '.UserModule::t("Login");
$this->breadcrumbs=array(
	UserModule::t("Login"),
);
Yii::app()->clientScript->registerScript(
   'myHideEffect',
   '$(".success").animate({opacity: 1.0}, 3000).fadeOut("slow");',
   CClientScript::POS_READY
);
?>

<div class="login"><h3><?php echo UserModule::t("Đăng nhập"); ?></h3>
    
    <?php if(Yii::app()->user->hasFlash('loginMessage')): ?>
    
    <div class="success">
        <?php echo Yii::app()->user->getFlash('loginMessage'); ?>
    </div>
    
    <?php endif; ?>
    
<!--    <p><?php // echo UserModule::t("Please fill out the following form with your login credentials:"); ?></p>-->
    
    <div class="form">
    <?php echo CHtml::beginForm(); ?>
    
       
        
        <?php // echo CHtml::errorSummary($model); ?>
        
        <div class="row">
            <label for="">Tên đăng nhập</label>
            <?php echo CHtml::activeTextField($model,'username') ?>
            <?php //echo CHtml::error($model,'username'); ?>
        </div>
        
        <div class="row">
            <label for="">Mật khẩu</label>
            <?php echo CHtml::activePasswordField($model,'password') ?>
            <?php //echo CHtml::error($model,'password'); ?>
        </div>
        
       
        
<!--        <div class="row rememberMe">
            <?php //echo CHtml::activeCheckBox($model,'rememberMe'); ?>
            <span>Ghi nhớ ?</span>
        </div>-->
  
        <div class="row submit">
            <label for="">&nbsp;</label>
            <?php echo CHtml::submitButton(UserModule::t("Login")); ?>
        </div>
           <div class="row">
            <p class="hint">
            <?php echo CHtml::link(UserModule::t("Đăng kí"),Yii::app()->getModule('user')->registrationUrl); ?> - <?php echo CHtml::link(UserModule::t("Quên mật khẩu ?"),Yii::app()->getModule('user')->recoveryUrl); ?>
            </p>
        </div>
    <?php echo CHtml::endForm(); ?>
    </div><!-- form -->
    
    
    <?php
    $form = new CForm(array(
        'elements'=>array(
            'username'=>array(
                'type'=>'text',
                'maxlength'=>32,
            ),
            'password'=>array(
                'type'=>'password',
                'maxlength'=>32,
            ),
            'rememberMe'=>array(
                'type'=>'checkbox',
            )
        ),
    
        'buttons'=>array(
            'login'=>array(
                'type'=>'submit',
                'label'=>'Login',
            ),
        ),
    ), $model);
    ?></div>